package edu.neu.highway.constant;

@SuppressWarnings("all")
public class Constant {
    public static final String INFLUXDB_TOKEN = "4StuXeQp0vHTMElvhqwoY3xNXFRodRlwlE5jnTQr0PJS-atSoeLD_WaV6kDX-mRESSDNpe1XOI1ct59nukSMPQ==";
    public static final String FLUX_QUERY_EXAMPLE = "from(bucket: \"highway-flow-bucket\")\n" +
            "  |> range(start: 1672729200, stop: 1672734600)\n" +
            "  |> filter(fn: (r) => r[\"_measurement\"] == \"highway_flow\")\n" +
            "  |> filter(fn: (r) => r[\"gate_id\"] == \"G0001121001000110010\" or r[\"gate_id\"] == \"G0001121001000110011\")\n" +
            "  |> filter(fn: (r) => r[\"_field\"] == \"pass_num\")\n" +
            "  |> filter(fn: (r) => r[\"in_station\"] == \"2101021F\")\n" +
            "  |> filter(fn: (r) => r[\"vehicle_type\"] == \"1\")\n" +
            "  |> aggregateWindow(every: 2s, fn: sum, createEmpty: false)";

    public static final String FLUX_BUCKET_FORMAT = "from(bucket: \"%s\")\n";

    public static final String INFLUXDB_BUCKET_NAME = "highway-flow-bucket";

    public static final String RANGE_FORMAT = "  |> range(start: %d, stop: %d)\n";

    public static final String FILTER_MEASUREMENT_FORMAT = "  |> filter(fn: (r) => r[\"_measurement\"] == \"%s\")\n";

    public static final String FILTER_GATE_ID_FORMAT = "  |> filter(fn: (r) => r[\"gate_id\"] == \"%s\")\n";

    public static final String FILTER_FIELD_FORMAT = "  |> filter(fn: (r) => r[\"_field\"] == \"%s\")\n";

    public static final String FILTER_IN_STATION_FORMAT = "  |> filter(fn: (r) => r[\"in_station\"] == \"%s\")\n";

    public static final String FILTER_VEHICLE_TYPE_FORMAT = "  |> filter(fn: (r) => r[\"vehicle_type\"] == \"%s\")\n";

    public static final String FLUX_AGGREGATE_FUNCTION_FORMAT = "  |> aggregateWindow(every: %ds, fn: %s, createEmpty: true)";

    public static final String FILTER_GATE_ID_HEAD = "  |> filter(fn: (r) => ";

    public static final String FILTER_GATE_ID_ITEM_FORMAT = "r[\"gate_id\"] == \"%s\"";

    public static final String FLUX_LINE_EXAMPLE_FORMAT = "highway_flow," +
            "gate_id=%s,in_station=%s,vehicle_type=%d " +
            "txn_price=8000,plate=\"辽A%s\",pass_num=1,etc_card_num=\"%s\"," +
            "etc_card_type=2,txn_time=%d,in_time=%d,obu_id=%s " +
            "%d";
}
